<template>
  <div id="app">
    <h-buttom :iconPosition='iconPosition1' :loading='loading' :icon='icon1' @click="click">
      这是一个
    </h-buttom>
    <h-buttom :iconPosition='iconPosition1' :icon='icon2' @click="click">
      按钮
    </h-buttom>
    <h-buttom :iconPosition='iconPosition2' :icon='icon4' @click="click">
      jsjsjs按钮
    </h-buttom>
  </div>
</template>
<script>
export default {
  data(){
    return{
      iconPosition1:'left',
      iconPosition2:'right',
      iconPosition3:'left',
      icon1:'H-Uidownload',
      icon2:'H-Uisetting',
      icon3:'H-UiLeft',
      icon4:'H-Uizan',
      loading:false
    }
  },
  methods: {
    click(){
      console.log('按钮被点击了')
      this.loading = true
      setTimeout(() => {
        this.loading = false
      }, 1000);
    }
  },
}
</script>

<style lang="scss">

</style>
